dom=function(){
	this.page=Object();
	this.componentes=Array();
	this.css=Array();
	this.gama="00";
	this.getImportJs=function(){
		if(this.componentes){
			for(con in this.componentes){
				this.loadRecurse(this.componentes[con],"js");
			}
		}
	}
	this.getImportCss=function(){
		if(this.css){
			for(con in this.css){
				this.loadRecurse(this.css[con],"css");
			}
		}		
	}
	this.loadRecurse=function(recurse,type){
		if(type=="js"){
			loadNode = document.createElement('SCRIPT');
			loadNode.type = 'text/javascript';
			loadNode.src = "js/"+recurse+".js";
		}else if(type=="css"){
			loadNode = document.createElement('LINK');
			loadNode.type = 'text/css';
			loadNode.rel = 'stylesheet';
			loadNode.src = "css/"+this.gama+"/"+recurse+".css";
		}else{
			if(console)console.log("el tipo de fichero no se puede cargar");
		}
		document.head.appendChild(loadNode);
	}
	this.paintHeader=function(){
	
	}
	this.paintBody=function(){
	
	}
}

main=new dom();